#losertakesdifference.py
import combat

punch = combat.Attack('punch', (('d2', combat.DT.CRUSH),) )
  
knife = combat.Attack('knife', (('d4', combat.DT.PIERCE),) )

mallet = combat.Attack('mallet', (('d6+2', combat.DT.CRUSH),) )
    
evasion = combat.Defense('evasion',
    effect = combat.FX.DODGE)

Harry = combat.Combatant('Harry')
Harry.ClearAttacks()
Harry.defensiverating = 100

Sally = combat.Combatant('Sally', introcomments= ["You're gonna get beat by a girl"])
Sally.ClearAttacks()
Sally.ClearDefenses()
Sally.defensiverating = 100


Harry.AddAttack(mallet, ["{name} swings at {opponent}", ])
Sally.AddAttack(knife, ["Sally stabs {opponent}",])
Sally.AddDefense(evasion, ["Sally ducks.", "Sally does the limbo under {opponent}'s attack."])

Manager = combat.CombatManager([Harry, Sally])
Manager.setDamageManager(combat.ToHitCheck)

Manager.processcombat()